import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [{
      path: '/',
      name: 'index',
      redirect: '/home',
    },
    {
      path: '/home',
      name: 'home',
      component: () => import('./views/Home.vue'),
    },
    {
      path: '/home/newsList',
      name: 'newList',
      component: () => import('@/components/news/newsList.vue'),
    },
//     {
//       path: '/newsInfo',
//       name: 'newsInfo',
//       component: () => import('@/components/news/newsInfo.vue')
//     },
    {
      path: '/member',
      name: 'member',
      component: () => import('./views/Member.vue')
    },
    {
      path: '/shopcar',
      name: 'shopcar',
      component: () => import('./views/Shopcar.vue')
    },
    {
      path: '/search',
      name: 'search',
      component: () => import('./views/Search.vue')
    }
  ]
})
